#pragma once
#include "xCommon/IxBuffer.h"

[
    default(IxBuffer),
    threading(free),
    uuid("494BB6B8-E4DC-444c-99D7-4837B203B727"),
    coclass
]
class ATL_NO_VTABLE CxBuffer : public IxBuffer
{
public:
    CxBuffer();
    virtual ~CxBuffer();

    DECLARE_PROTECT_FINAL_CONSTRUCT()

public:
    // interface of IxBuffer
    HRESULT GetBuffer(LPBYTE* ppBuffer);
    HRESULT Resize(UINT uSize, BYTE** ppbyBuf);
    HRESULT GetSize(LPUINT lpuSize);
    HRESULT Clear();

protected:
    std::string     m_buffer;
};